import React from 'react'
// clickBtn
// amount
class App extends React.Component {
  render () {
    let {text = window.LangMessage.web_confirm || '确认', amount, clickBtn} = this.props
    amount = T.cutPrice(amount)
    let url = location.href

    if (url.indexOf('yj-en') > -1) {
      amount = '$' + T.formatPrice(amount)
    } else {
      amount = T.formatPrice(amount) + '円'
    }
    return (
      <div>
        <div className='bgfw g-bottomFix bor-top clearfix'>
          <div className='fl' style={{width: '50%'}}>
            <div className='tac text fl ml30'>{window.LangMessage.policy_fee || '保费'}：<span className='f40 color-price ml10'>{amount}</span></div>
          </div>
          <div className='fr btn diy_background fcw tac f30' style={{width: '50%'}} onClick={clickBtn}>{text}</div>
        </div>
      </div>)
  }
}

export default App
